HAL GENERIC migration: List of applicable concepts ¶
This section provides information about the HAL GENERIC applicable architecture concepts.
Concepts for GENERIC ¶
|
Concept |
Description |
|---|---|
|
Split initialization into separate initialization and configuration functions (example for the VREFBUF driver):
|
|
|
|
|
|
Introduce new unitary configuration APIs such as
|
|
|
HAL GENERIC APIs now rely on LL APIs rather than performing direct register access. |
|
|
Define statements and enumerations redirected to LL equivalents |
HAL GENERIC define statements and enumerations are based on LL define statements. |
|
All hardware macros have been removed from the HAL GENERIC driver, and equivalent services are ensured through the LL APIs. |
|
|
Update SYSCFG/SBS, DGBMCU and VREFBUF functions to return:
|
|
|
All TypeDef parts of the HAL GENERIC driver have been removed and replaced by
|
|
|
For the HAL GENERIC driver, large macros have been replaced by inline functions to maintain code consistency, improve readability, and benefit from compiler optimization. Inline functions also offer better support for debugging and strict type management, reducing the risk of errors. |
|
|
The parameters and state are checked using
|
|
|
|
|
|
Cleanup stm32tnxx_hal.c/h and move HAL module includes to stm32_hal.h |
Refactor
|
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (for DBGMCU, SYSCFG/SBS, and VREFBUF drivers) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
|
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions). |
All HAL DBGMCU ,SYSCFG/SBS and VREFBUF functions start with
|